package cjy.javatest.observer;

public interface Subject {
    // Attach an observer to the subject
    void attach(Observer observer);

    // Detach an observer from the subject
    void detach(Observer observer);

    // Notify all observers about a change in the subject's state
    void notifyObservers();

    // Set the state of the subject and notify observers
    void setState(int state);

}
